package com.example.demo3;

import com.example.demo3.V3.UserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Demo3Application {
    public static void main(String[] args) {
        ConfigurableApplicationContext context =  SpringApplication.run(Demo3Application.class, args);
//        HelloController bean = context.getBean(HelloController.class);
//        bean.print();
//        HelloController bean2=(HelloController) context.getBean("helloController");
//        bean2.print();
//        HelloController bean3=context.getBean("helloController",HelloController.class);
//        bean3.print();
//        UserService helloController = (UserService) context.getBean("userService");
//        helloController.print();
//        UserService userService = (UserService) context.getBean("userService");
//        userService.print2();
    }
}
